Revive webmcp dead features - #2
Merged
Merged
Conversation
The App Hosting build died before installing a single dependency:
Installing pnpm v12.0.0
pnpm v12.0.0 detected (>= 11.0.0), downloading tarball.
Error: Cannot find module '/layers/google.nodejs.pnpm/pnpm_engine/bin/dist/pnpm.mjs'
Nothing asked for pnpm 12. `packageManager` says `pnpm@10.14.0` and CI resolves
that correctly, but the buildpack does not read `packageManager` — it reads
`engines.pnpm`, treats it as a semver *range*, and installs the highest match
from the registry. Our `">=10"` therefore meant "whatever pnpm shipped most
recently", which is 12.0.0 as of today; confirmed by resolving the range against
registry.npmjs.org rather than inferring it from the log.
pnpm 12 then hits a broken branch in the buildpack itself: for >= 11 it unpacks
the standalone GitHub release, which is a self-contained binary, but still
launches it as `node <layer>/bin/dist/pnpm.mjs` — a path that exists only in the
npm package layout. So the failure was never about our dependencies, and no
local or CI run could have caught it, because both honour `packageManager`.
`engines.pnpm` is now an exact `10.14.0`, matching `packageManager` and the
lockfile it generated. This has to stay below 11 until that buildpack branch is
fixed.
Also drops BUILD availability from NODE_ENV, which would have been the next
failure. The buildpack installs with `pnpm install --prod`, and under
NODE_ENV=production that omits every devDependency — while this build is almost
entirely devDependencies: the Angular CLI, the Nest CLI, typescript. Nothing in
the build reads NODE_ENV (Angular takes `production` from angular.json); the
only reader in the repo is `EnvService.partnerOrigin`, per request, at runtime.
So RUNTIME availability loses nothing.
The `Failed to find version for package @angular/core in pnpm lockfile` warnings
above the failure are unrelated and expected: that is the `firebaseangular`
buildpack's detect step, which looks for Angular in the root importer and finds
it under `frontend:` instead. It exits 1 meaning "does not apply", which is
correct — this repo builds through the generic Node path with an explicit
buildCommand and runCommand.
Both gotchas recorded in apphosting.yaml and CLAUDE.md, since neither is
reproducible outside a real deploy.
Verified locally: `pnpm install --frozen-lockfile` clean on 10.14.0,
`pnpm run build` exit 0 through prerender and the SEO stamp.
…IC_ORIGIN a scheme
Two problems that would have survived a green build, found while confirming the
pnpm fix against the real backend.
**`*.hosted.app` was missing from NG_ALLOWED_HOSTS, and it is the domain this
service actually answers on.** The backend serves
`actuo--actuo-2f1f3.asia-east1.hosted.app`; the allowlist listed `*.web.app` and
`*.firebaseapp.com`, which are Firebase Hosting domains, not App Hosting ones. I
introduced this in the previous commit and described `*.hosted.app` as "not a
domain this deploy serves from", which was wrong — `apphosting:backends:list`
says otherwise. Off the allowlist Angular does not error, it silently renders
client-side, so the symptom would have been a working site with the SSR and
structured-data work in §8.5 quietly gone.
Checked the matching rule rather than assuming it: `isHostAllowed` turns `*.x`
into `hostname.endsWith('.x')`, so one wildcard covers the multi-label
`actuo--actuo-2f1f3.asia-east1.hosted.app`. The other entries are kept — they
cost nothing and cover a Firebase Hosting rewrite if one is ever put in front.
**PUBLIC_ORIGIN had no scheme.** stamp-seo.mjs substitutes the value verbatim,
so `actuo.programmersingh.dev` produced
`<loc>actuo.programmersingh.dev/</loc>` — which `new URL()` rejects. The build
would not have failed; the sitemap would just have been invalid and og:image
unresolvable. Now `https://actuo.programmersingh.dev`, and the requirement is
written next to the value because the variable name does not imply it.
That domain is NXDOMAIN today, which is a deliberate choice to keep the canonical
pointing where the site will live rather than where it currently is. Recorded as
a prerequisite in the file: attach it to the backend and point DNS, or the
canonical advertises a dead host.
Verified: build exit 0, 28 URLs stamped absolute across 7 files, sitemap `<loc>`
and `<link rel=canonical>` both valid absolute URLs, and `ng-server-context`
still present in the prerendered index.html.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.